package com.ep.general.app.login;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.ep.general.ActionSupportCustom;
import com.opensymphony.xwork2.ActionSupport;

public abstract class AbstractLoginAction<T> extends ActionSupport implements
		SessionAware {

	private static final long serialVersionUID = 5423815709746494889L;

	private String login;
	private String password;
	private Map<String, Object> session;

	public Map<String, Object> getSession() {
		return session;
	}

	@Override
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}

	public void setLoggedUser(T user) {
		getSession().put(ActionSupportCustom.LOGGED_USER, user);
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
